package com.ranyk.www.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * CLASS_NAME: UserLoginLog.java <br/>
 *
 * @author ranyk           <br/>
 * @version V1.0           <br/>
 * @decription: cms_user_login_log 数据表实体类  <br/>
 * @date: 2022-04-03 <br/>
 */
@Data
@TableName("cms_user_login_log")
@EqualsAndHashCode(callSuper = true)
public class AdminUserLoginLog extends Model<AdminUserLoginLog> {

	@Serial
	private static final long serialVersionUID = 279466864638397496L;

	/**
     * 登录日志ID
     */
	@TableId(value="log_id", type= IdType.AUTO)
	private Long logId;
    /**
     * 登录时间
     */
	@TableField("login_time")
	private Date loginTime;
    /**
     * 登录IP
     */
	@TableField("user_ip")
	private String userIp;
    /**
     * 管理员ID
     */
	@TableField("user_id")
	private Long userId;
    /**
     * 操作系统
     */
	@TableField("operating_system")
	private String operatingSystem;
    /**
     * 浏览器
     */
	private String browser;
	

	public AdminUserLoginLog() {
		super();
	}

	public AdminUserLoginLog(Date loginTime, String userIp, Long userId, String operatingSystem,
                        String browser) {
		super();
		this.loginTime = loginTime;
		this.userIp = userIp;
		this.userId = userId;
		this.operatingSystem = operatingSystem;
		this.browser = browser;
	}

	@Override
	public Serializable pkVal() {
		return this.logId;
	}

}
